//
//  JSDImageManager.h
//  JPhotoBrowser_Example
//
//  Created by 计海峰 on 2017/11/16.
//  Copyright © 2017年 jhfappkf@163.com. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void (^KSImageManagerProgressBlock)(NSInteger receivedSize, NSInteger expectedSize);

typedef void (^KSImageManagerCompletionBlock)(UIImage * _Nullable image, NSURL * _Nullable url, BOOL success, NSError * _Nullable error);

@interface JSDImageManager : NSObject

- (UIImage *_Nullable)imageFromMemoryForURL:(NSURL *_Nullable)url;
 
- (void)cancelImageRequestForImageView:(nullable UIImageView *)imageView;


- (void)setImageForImageView:(nullable UIImageView *)imageView
                     withURL:(nullable NSURL *)imageURL
                 placeholder:(nullable UIImage *)placeholder
                    progress:(nullable KSImageManagerProgressBlock)progress
                  completion:(nullable KSImageManagerCompletionBlock)completion;


@end
